<style type="text/css"> .active{border-bottom:4px solid #059BF3;} .nav li{width: 33.3%;text-align: center;} .table{margin: 3%;width:94%;} th,td{text-align: center;width:30%;} </style>
<div class="wapper" id="damaTj">
		<div class="div-c-main col-xs-12 col-sm-4 col-sm-offset-4" style="position: fixed;padding: 0">
			<div class="div-c-headerWrapper" style="padding-left:0;padding-right:0;">
				<div class="text-center bg-theme" style="font-size:16px;height: 50px;display:flex;align-items:center;justify-content:center;margin-top: 0px;left: 0px;z-index: 100;position: relative;">
					<a class="glyphicon glyphicon-chevron-left " onclick="backPage()" style="color: white;position:absolute;left:10px;top:50%;transform:translateY(-50%);"></a>
					<strong style="font-size: 20px;" id="strong-i-name">打码记录</strong>
				</div>
			</div>
			<ul class="nav nav-tabs" style="background: white;">
				<li class="active" data="1"><a>今日打码</a></li>
				<li data="2"><a>本月打码</a></li>
				<li data="3"><a>历史打码</a></li>
			</ul>
		</div>	
		<div class="col-xs-12 col-sm-4 col-sm-offset-4" style="position: absolute;z-index: -1;margin-top: 100px;margin-bottom: 50px;padding: 0">
			<h4 style="text-align:center;">总量：<span id="dmhj">0.00</span></h4>
			<table class="table table-bordered">
				<thead>
					<tr>
						<th>序号</th>
						<th>彩种</th>
						<th>打码量</th>
					</tr>
				</thead>
				<tbody></tbody>
			</table>
		</div>
	</div>

<script type="text/javascript">
		$(".nav li").on("click",function(){
			$(".active").removeClass("active");
			$(this).addClass("active");
			var type=$(this).attr("data");
			sendAjax(type);
		});
		function sendAjax(type){
			$.ajax({
				url:"/damalType.do",
				data:{type:type},
				dataType:"json",
				success:function(data){
					if(data == 50) { 
						save.push("sy");
						bindSetData("login"); 
						return;
		   			}else if(data==60){
		   				pagePreserve();
		   				return;
		   			}
					$(".table tbody").html("");
					var d=data.data;
					var x="";
					for(var i=0;i<d.length;i++){
						x+="<tr><td>"+(i+1)+"</td><td>"+d[i].cname1+"</td><td>"+d[i].acount+"</td></tr>";
					}
					$(".table tbody").html(x);
					$("#dmhj").text(data.message);
				},
			});
		}
		sendAjax(1);
	</script>

